function my_install(router, connection) {

    // 获取分类
    router.post('/get_categoryItems', async (ctx, next) => {
        ctx.body = await new Promise((resolve, reject) => {
            let category_id = ctx.request.body.category_id
            let sql_str = `SELECT * FROM tcategoryItem where category_id='${category_id}'`
            connection.query(sql_str, function (error, results, fields) {
                if (error) {
                    throw error
                } else {
                    resolve({
                        value: results
                    })
                }
            })
        })
    })
}
module.exports = { my_install }